/**
 * 从答复中提取html代码
 * @param {string} markdownText 
 * @returns {string}
 */
module.exports.extractHtmlFromMarkdown = (markdownText) => {
  const htmlRegExp = /```html\n([\s\S]+?)\n```/g;

  let htmlCode = "";
  let match;

  while ((match = htmlRegExp.exec(markdownText)) !== null) {
    htmlCode += match[1] + "\n\n";
  }

  return htmlCode;
};
